/****产品模板数据***/
class GoodsTlpBean {
	constructor(arg) {
		this.attrList = ""; //产品

		this.barCode = 1; //条形码开关 1=打开，2：关闭

		this.brand = 1; //品牌开关， 1=打开，2：关闭

		this.brandMore = 1; //多品牌开关，1=打开，2：关闭

		this.cost = 1; //成本开关; 1=打开，2：关闭

		this.costQuoteTtype = 1; //成本报价方式  1=打开，2：关闭

		this.desc = 1; //产品详情  1=打开，2：关闭

		this.id = 1; //产品模板id 

		this.itemNo = 1; //货号 1=打开，2：关闭

		this.onSale = 1; //上架 1=打开，2：关闭

		this.priceList = ""; //价格列表 1=打开，2：关闭

		this.priceQuoteType = 1; //报价方式

		this.share = 1; //共享描述开关 1=打开，2：关闭

		this.spec = 2; //多规格  1=打开，2：关闭

		this.specList = null; // 规格列表 

		this.tag = 1; //标签 1=打开，2：关闭

		this.tagList = ""; //标签列表id

		this.timeTpl = 0; //模板创建和修改时间

		this.title = 1; //产品名称,1=打开，2：关闭

		this.txt = 1; //产品备注 1=打开，2：关闭

		this.outday = 1 //有效期 1打开,2关闭

		this.unit = 0; //单位 1=打开，2：关闭

		this.coupons = 0; //是否有优惠券

		this.pricec = 0; //是否有划线价格
	}

	/***设置模板基础数据****/
	setTlpInfoData(data) {
		if (!data) return;
		if (data.attr_ls)
			this.attrList = data.attr_ls;

		if (data.barcode)
			this.barCode = data.barcode;

		if (data.brand)
			this.brand = data.brand;
		if (data.brand_m)
			this.brandMore = data.brand_m;

		if (data.cost)
			this.cost = data.cost;

		if (data.cost_quote_type)
			this.costQuoteTtype = data.cost_quote_type;

		if (data.desc)
			this.desc = data.desc;

		if (data.id)
			this.id = data.id;

		if (data.item_no)
			this.itemNo = data.item_no;

		if (data.onsale)
			this.onSale = data.onsale;

		if (data.price_ls)
			this.priceList = data.price_ls;

		if (data.price_quote_type)
			this.priceQuoteType = data.price_quote_type;

		if (data.share)
			this.share = data.share;

		if (data.spec)
			this.spec = data.spec;

		if (data.spec_ls)
			this.specList = data.spec_ls;

		if (data.tag)
			this.tag = data.tag;

		if (data.tag_ls)
			this.tagList = data.tag_ls;

		if (data.time_tpl)
			this.timeTpl = data.time_tpl;

		if (data.title)
			this.title = data.title;

		if (data.txt)
			this.txt = data.txt;

		if (data.outday)
			this.outday = data.outday;
			
		if (data.unit)
			this.unit = data.unit;

		if (data.money_q)
			this.coupons = data.money_q;

		if (data.pricec)
			this.pricec = data.pricec;
	}

	/***设置规格列表数据***/
	setSpecList(data) {
		this.spec_ls = data;
	}
}
export default GoodsTlpBean;